<include file="Public:header" />
<script type="text/javascript" src="__PUBLIC__/admin/js/engine.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/jq_validate.js"></script>
<script type="text/javascript">
$(function(){
	$('#title').validate('required','请填写栏目标题').validate('maxlength',30,'标题长度10~30个字符').validate();
	$('#model').validate('selectRequired','请选择栏目类型').validate();
	$('#web_url').validate('url','web地址格式不正确，请以http://开头').validate();
	$('#dataForm').submitValidate();	
});
</script>
<body class="mainBackground">
	<include file="Public:menu" />
	<div class="main" id="mainContainer">
        <!--发布-->
    	<div class="content_box">
        	<div class="content_box_t">
            	<h3 class="fl">
                <neq name="data[parent_id]" value=''>
                编辑<else/>添加</neq>栏目
                </h3>
            </div>
            <div class="content_box_c">
            	<form action="__ACTION__" method="post" id="dataForm" name="dataForm">
                	<neq name="parentId" value=''> 
                	<div class="field">
						<label>上级栏目:{$parentTitle}</label>
					</div>
                    </neq>
                    <neq name="data[parent_id]" value=''> 
                	<div class="field">
						<label>上级栏目</label>
						<select name="parent_id" class="public_dropdown small_input" id="parent_id">
        					<option value="0">顶级栏目</option>
            				{$optionStr}
						</select>
					</div>
                    </neq>                                                  
                	<div class="field pt15">
						<label>标题</label>
						<input class="text_input medium_input" type="text" name="title" id="title" value="{$data.title}" />
                        <span class="input_notification  png_bg" id="titleTip"></span>
						<small>必填</small>
					</div>
                	<div class="field pt15">
						<label>模型</label>
						<select name="model" class="public_dropdown small_input" id="model" type="select-one">
        					<option value="0" >请选择模型</option>
            				<volist name="modelArray" id="vo">
                            	<option value="{$vo.key}" <eq name="vo.key" value="$data[model]">selected</eq>
                                />{$vo.title}</option>
               				</volist>
						</select>
                        <span class="input_notification  png_bg" id="modelTip"></span>
					</div>
                	<div class="field pt15">
						<label>类型</label>
                        <volist name="typeArray"  id="vo">
                                <input type="radio" name="is_type" value="{$key}" 
                                <eq name="key" value="$data[is_type]">checked</eq>
                                />{$vo}
               			</volist>
						
                        <small>选择外部链接时，外链地址生效</small>
					</div>                    
                	<div class="field pt15">
						<label>外链地址</label>
						<input class="text_input medium_input" type="text" name="web_url" id="web_url" value="{$data.web_bei}"/>
                        <span class="input_notification  png_bg" id="web_urlTip"></span>
						<small>以"http://"开头</small>
					</div>
                	<div class="field pt15">
						<label>是否在导航显示</label>
						<input type="checkbox" name="show_in_nav"  value="1" <eq name="data.show_in_nav" value="1"> checked</eq> />是 
                        <small>默认显示</small>
					</div>
                	<div class="field pt15">
						<label>是否为列表</label>
						<input type="checkbox" name="is_list"  value="1" <eq name="data.is_list" value="1"> checked</eq>/>是 <small>列表可以发布文章，否则为频道模式</small>
					</div>
                	<div class="field pt15">
						<label>是否开放</label>
						<input type="checkbox" name="status"  value="1" <eq name="data.status" value="1"> checked</eq>/>是
                        <small>默认开放</small> 
					</div>                                                       
                	<div class="field pt15">
						<label>SEO标题</label>
						<input class="text_input medium_input" type="text" name="seo_title" value="{$data.seo_title}"/>
						<small>自定义标题,一般不超过80个字符</small>
					</div> 
                	<div class="field pt15">
						<label>SEO关键词</label>
						<input class="text_input medium_input" type="text" name="seo_keywords" value="{$data.seo_keywords}"/>
						<small>关键词以","隔开一般不超过100个字符</small>
					</div>
                	<div class="field pt15">
						<label>SEO描述</label>
						<textarea class="text_input" name="seo_description" cols="79" rows="5">{$data.seo_description}</textarea>
						<small>帮助SEO优化,一般不超过200个字符</small>
					</div>                                                           
                    <div class="field pt15 clearfix">
                    	<input type="hidden" name="id" value="{$data.id}"/>
                        <neq name="parentId" value=''> 
                        <input type="hidden" name="parent_id" value="{$parentId}"/>
                        </neq>    
                    	<input type="submit" value="提交" class="public_button fr" />
                    </div>                                                                               
                </form>
            </div>
        </div>            
        <!--发布结束-->
    </div>
</body>
</html>
